package main.java.rock.acm.dp;

import org.apache.commons.collections.map.LinkedMap;

import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Main10 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        String line = scan.nextLine();
        Map<String,Integer> map = new LinkedMap();
        char[] lineBytes = line.toCharArray();
        int i = 0;
        for (char lineByte : lineBytes) {

            Integer integer = map.get(String.valueOf(lineByte)+i);
            if(integer !=null){
                integer++;
                map.put(String.valueOf(lineByte)+i,integer);
            }else{
                map.put(String.valueOf(lineByte)+i,1);
                i++;
            }

        }
        Set<String> bytes = map.keySet();
        StringBuilder stringBuilder = new StringBuilder();
        for (String aByte : bytes) {
            stringBuilder.append(aByte).append(map.get(aByte));
        }
        String result = stringBuilder.toString();
       // System.out.println(result);
        if(result.length()>line.length()){
            System.out.println(result);
        }else{
            System.out.println(result);
        }
    }
}
